<template>
  <div class="q-pa-md">
    <t-btn-dropdown
      split
      color="orange"
      push
      glossy
      no-caps
      icon="folder"
      label="Dropdown Button"
      @click="onMainClick"
    >
      <t-list>
        <t-item clickable v-close-popup @click="onItemClick">
          <t-item-section avatar>
            <t-avatar icon="folder" color="primary" text-color="white" />
          </t-item-section>
          <t-item-section>
            <t-item-label>Photos</t-item-label>
            <t-item-label caption>February 22, 2016</t-item-label>
          </t-item-section>
          <t-item-section side>
            <t-icon name="info" color="amber" />
          </t-item-section>
        </t-item>

        <t-item clickable v-close-popup @click="onItemClick">
          <t-item-section avatar>
            <t-avatar icon="assignment" color="secondary" text-color="white" />
          </t-item-section>
          <t-item-section>
            <t-item-label>Vacation</t-item-label>
            <t-item-label caption>February 22, 2016</t-item-label>
          </t-item-section>
          <t-item-section side>
            <t-icon name="info" color="amber" />
          </t-item-section>
        </t-item>
      </t-list>
    </t-btn-dropdown>
  </div>
</template>

<script>
  export default {
    setup() {
      return {
        onMainClick() {
          // console.log('Clicked on main button')
        },

        onItemClick() {
          // console.log('Clicked on an Item')
        },
      };
    },
  };
</script>
